package com.zhuiYun.project.api.sysUser.service;

import com.zhuiYun.project.api.sysUser.entiy.SysUser;
import com.zhuiYun.project.api.sysUser.model.SysUserModel;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;
import com.zhuiYun.project.util.pageUtil.PageRequest;

/**
 * @ClassName UserService
 * @Description 系统用户服务类
 * @Author zcy
 * @Date 2023/3/24 15:43
 **/
public interface SysUserService {
    /**
     * 通过登录名登录
     * @param loginName
     * @return
     */
    SysUser getUserByLoginName(String loginName);

    /**
     * 修改用户状态
     * @param sysUser
     */
    void updateUserByLogin(SysUser sysUser);

    /**
     * 新增用户
     * @param sysUserModel
     * @return
     */
    CommonResult saveUser(SysUserModel sysUserModel) throws CommonException;

    /**
     * 修改用户信息
     * @param sysUserModel
     * @return
     */
    CommonResult updateUser(SysUserModel sysUserModel) throws CommonException;

    /**
     * 删除用户
     * @param id
     * @return
     */
    CommonResult delUserById(Integer id) throws CommonException;

    /**
     * 分页查询
     * @param sysUserModel
     * @param pageRequest
     * @return
     */
    CommonResult getUserByPage(SysUserModel sysUserModel, PageRequest pageRequest);
}
